Tags: System/OPS LinuxPrevious section review:1. Locate command2. Whereis,which commandJob: Create a file myfile.txt, find it with locate, and find the CD command with which and Whereis, respectivelyTouch MyFile.txtLocate MyFile.txtUpdateDBLocate MyFile.txtWhereis CDwhich CD1. gzip/gunzipGzip is used to compress files in place, it is simple to use, for example, we want to compress the messages file under/v
The specified directory must be excluded during compression. I don't know why it is in Solaris.
Tar CVF a.tar A -- exclude = A/B/log -- exclude = A/C/mm7log is invalid,
Finally, the following method is used:Create an exclude-list file VI exclude-list and write the directories to be excluded from compression.
A/B/log
A/C/mm7log
Save and exit
Execute Command
contents of an archive.XExtract the contents of an archive.FThe archive file name is given on the command line (required whenever the tar output is going to a file)MThe archive can span multiple floppies.VPrint verbose output (list file names as they are processed ).UAdd files to the archive if they are newer than the copy in the TAR file.ZCompress or decompress
Iii. Linux/UNIX operating command accumulation [gzip, jar, tar, find, crontab]
In Linux/UNIX, users often use text interfaces to set up systems or operating systems. The author is constantly working on these commands, therefore, this article has been specially developed, prepared, and started. This article mainly records some of the operating commands you encount
*. Files compressed by the Zcompress program ;*. bz2bzip2 compressed file ;*. files compressed by the gzgzip program ;*. the data packaged by the tartar program has not been compressed. the files packaged by the * .tar.gz tar program are compressed by gzip! Ww...
*. Z compress compressed files; *. bz2 bzip2 compressed files;
*. Files compressed by the gz gzip pro
Tar: create an archive file [Syntax] tar [option] tarfilefilename [command description] the file name must be followed by the-f parameter and
Tar
[Syntax] tar [option] tarfile filename
[Command description]
The file name must be f
Tar
[Syntax] tar [option] tarfile filename
[Command description]
The file name must be followed by the-f parameter and used as the last parameter;
[Parameter description]
-C. Create a new archive file;
-F specifies the file name;
-R: append an object to an archive object;
-X Extract files from archive files;
-V and-vv display progress information;
-T list the inf
1. Command: gzip (zip file)Zip file suffix. gzPs:gzip test.txt Result: Generate file test.txt.gz, original file test.txt disappear.Note: Only files can be compressed, the directory cannot be compressed, the original files are not preserved after compression, about 1/5 compression ratioDecompression command: Gunzip2. Command
all the files in the All.tar package------X is the meaning of the undo
The above is the most basic use of tar. In order to facilitate the packaging and unpacking of the user can be compressed or decompression
File, Tar provides a special feature. This is where tar can call other presses while packing or unpack.
Shrink programs, such as calling
file,-U is to indicate the meaning of the update file.# TAR-TF All.tarThis command is to list all the files in the All.tar package,-T is to list the meaning of the file# TAR-XF All.tarThis command is to solve all the files in the All.tar package,-X is the meaningThese are the most basic uses of
Tar commandThe first thing to understand is two concepts: packaging and compression. Packaging refers to a large number of files or directories into a total file, compression is a large file through some compression algorithm into a small file.Why should we differentiate between these two concepts? This is due to the many compression programs in Linux that can only be compressed for one file , so that when you want to compress a lot of files, you have
Gzip, bzip2, tar, zip command usage details 1. gzipgzip is a GNU compression program. It only compresses a single file. The basic usage is as follows: after the $ gzip filenameprogram is executed, the file name is changed to filename.gz, And the size is usually smaller than that of the original file. Then, the program
For details about tar, gzip, and unzip commands, refer to tar to create files and directories. Using tar, you can create a file (backup file) for a specific file, change the file in the file, or add a new file to the file. Tar was originally used to create files on tape. Now
Today in Aix with TAR-CVF backup, make a tar package, occupy the hard disk space is too large, no compression ratio,
Try to use the TAR-ZCVF Linux system can use the-z command (z with gzip to compress/extract the file, plus this option to compress the archive file, but the
For details about tar, gzip, and unzip commands, refer to tar to create files and directories. Using tar, you can create a file (backup file) for a specific file, change the file in the file, or add a new file to the file. Tar is used to create detailed usage of
prompts you to use a new storage device. When you use the M option to archive a disk drive, when a floppy disk is full, the tar command reminds you to add a new floppy disk. In this way, you can save the tar file to several disks.
$ Tar CMF/dev/fd0/home
To restore the files on several disks, you only need to put the f
command prompts you to use a new storage device. When you use the M option to archive data to a soft drive, when a floppy disk is full, the tar command reminds you to add a new floppy disk. In this way, you can save the tar file to several disks.
$ Tar CMF/dev/fd0/home
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.